home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
windows
/
sw14c.zip
/
SIMPWN14.ZIP
/
simpwn14.doc
< prev
next >
Wrap
Text File
|
1996-10-30
|
72KB
|
2,080 lines
Simple Windows 1.4B
Copyright 1994,1995,1996 By Bruce O'Banion
A Text graphic I/O engine for Turbo C/C++
Turbo C 2.0and Turbo C++ 1.0 copyrigth 1987-1990
by Borland International Inc.
MS-DOS 5.0 copyright 1991 byMicrosoft Corp.
Table of Contense
General Info Page 3
Registration Page 5
Support Page 6
Future Page 7
Quarks/Hints Page 8
Fungtions:
Window Page 9
Menu Page 13
Entery Page 15
Print Page 18
Screen Page 21
Music Page 24
File Page 25
Init Page 27
Mouse Page 28
Legal Stuff Page 32
General Info
Simple Windows 1.4 is a text graphic orentated Turbo c/c++
utilitie. The basic system used is file allocation with a static
18k buffering system. This system achieves a small static ram
usage with vertualy unlimited capacity. Litraly thousands of
windows, menus, forms, and songs can be used and the libary will
remain a static 18k ram usage. The libaries are small. ranging
from less than 35k to max 50k for the large debug libary. The
libary contains window and menu managment. Both screen and print
form loads. Tone and cord music routines as will as a playsong
fungtion. There is also file managment for all opening and closing
operations including pointers. Print management for 60 line by 80
characters pages is also included as will as a makefile editor for
the load files. There are two types of libaries, debug and
nodebug. Swinerrx.lib is the debug libary and contains checks on
parameters and files and displays error messages on screen. The
error massage will appear and the fungtion will abort. The massage
will contain the prarmeter found bad, the funtion it is in and the
number of the current window. Swinx.lib contains no error
detection but will return error codes from the fungtions on file
allocation. It is also smaller.
All fungtions return 0 on success and 1 on failer except cursor
hide/show All file allocations return -1 on end of file or
_doserrno on all other fails. Printer fungtions _doserrno on
failer,3 on time out, and biosprint stats for any other failer and
0 for succsess. Mouse21 is a small mouse fungtion library that has
a graphics cursor as will as the standard text graphics cursor.
There are defines for left, right and mid button pressed and
release. Loadcurs() loads one of 8 cursors for graphics cursor.
Simptut.c is included for study and you can fell free to use
any of the code included in it.
Simple Windows libaries were compiled on a 386 clone using Turbo
C 2.0 and Turbo C++ 1.0. Coprosseser emulation was used.
SKDEF.H is the special key bios codes (F, ALT, PageUP/DN,
CURSOR) and should be included if these are to be used.
Installation is easy just unzip SW14d.ZIP and from that
directory or disk type install at the prompt. Then follow the
instructions. Simple Windows can be deinstalled by running
deinstal.exe from the distribution disk or if zipped unzip to a
temp directory and run from there the same as install.exe.
Simpwn14.doc can be read or printed with readocs.exe. It is a text
file reader/printer and will read or print a text file.
Makefile is the real heart of simple windows. It is the editor
for constructing the call files. It has help screens for every
fungion. All you have to do is cursor to the fungtion and hit F1.
A help screen will then appear.
There are six types of files 5 are for the call files themselves
(window, menu,screen forms, print forms, and songs). The sixth is
the scheme file. It is for viewing your graphics for your entire
program. The current scheme display is also used when creating
windows and menus. At this point each file must be loaded to be
able to edit it. So if you were working on a window and you want
to put a menu in it you must load the menu file and after that
you want to work on a window you must agian load the window file.
When all your files are made they then can be call in the
program saving much coding that would be required to build them
in the program. This will make your program much smaller and also
allows you to design your graphics with out using the compiler or
,if you use a graphic artist, knowing programing.
For now the editor is fairly crude but the upgrade will have
click drag mouse and only a single name for the files will be
needed. The exstentions and loading will be automatic so you will
be able to make windows, menus, and forms with out stopping or
leaving the editor screen.
Feel free to call me or leave a note of criticism or prase about
this or any othe part of this utility. Any feedback will be
greatly appreciated.
Lfsw14.exe uses the file name of the font file you are loading
as a parameter. Use system and call lfsw14 font.fnt(or file name)
to load fonts in the program.
Example:
system("lfsw14 medieval.fnt");
This will load the medieval font and display it.
Registration
Registration gets you the large libaries, phone support for one
year and your registration fee goes toward future upgrades.
Registration fee is $50. Print the following form and send it to:
Bruce R. O'Banion
318 Oak St.
Modesto CA 95351
Or call me at : 209-522-2664
I will fill any order as soon as posible.
Also be sure to include a check or money order. NO CASH PLEASE!
I will fill the order when the check clears. Make checks payable
to
Bruce R. O'Banion
Name:
Address:
Phone :
Type of machine:
Type of disk 3 1/2 hi
(circule one) 5 1/4 hi
Quanity: ______ Amount inclosed: _________
Sign here _________________________
Support
I will be avalible for tech support at this address:
Bruce R. O'Banion
318 Oak St.
Modesto CA. 95351
Phone: 209-522-2664 (24hr answer machine)
Or on the internet 103675,152@compuserve.com
Home page: http://ourworld.compuserve.com/homepages/ob_won_can_ob
Compuserve CIS:ASPFORUM
The Future
The future looks bright for simple windows. I plan for more
music cords and styles, 4 screens modes, a better makefile editor,
more enteries like float and double. I am also working on a full
screen editor as a single call. There will be complete window
management, editing, and moves. Also Dual screen fonts with full
font editing. There will be 16 out of 64 colors in EGA and over
200k in VGA. Last but not least more ASM code for speed and size
and more.
Later still I plan to take this system to full graphics and i/o
control for a complete i/o utilitie. Agian the system will remain
small and static for easy programming. If you have suggestions
feel free to contact me.
Email 103675.152@compuserve.com
Or see my web page and the other Simply Soft products:
http://ourworld.compuserve.com/homepages/ob_won_can_ob
Quarks
SIMPLE WINDOWS:
When compiling small debug libary a text overflow may occur.
Change to the large debug libary and compile tell error free
then try the small nondebug libary.
Read/write_file may show suspicious pointer error but comform
to "The C Programing Language" by Kerningham and Ritchie.
Hints
Makefile:
When using the screen editor layout all the coordenents on
graph paper then enter them as you have layed them out.
Make all windows and menus in order (window 1,menu 1,window
2, ect ...). This will show your scheme as it will apear in
your program.
For songs also lay them out on paper then enter them.
Mouse 21:
A debugging tip with Mouse21 is to have a key entery in the
mouse loop because there is no handler so you can't see the
mouse cursor from the screen. To do it in simptut just
remove the bioskey(1) if statment. This will make the loop
stop and look for key entery at the bioskey(0) call.
The mouse functions were yested on Logitc Mouse and my not be
fully compatable with Micro Soft Mouse.
Window Functions
simp_window()
----------------------------------------------------------------
Simp_window() is the basic window fungtion. It dose not mask
so what is on screen a the time of call is lost. If you study the
simptut code you will see that I use simp_window() as a base
window and with mouse along with a screen save.
The parameters for this fungtion are the corner coordinates
left, top, right, bottom. The boarder and shadow styles are next.
Then come the text attributes foreground and back ground. Next is
the shadow location. After that come the shadow attributes fore
and back. Last the boarder character if needed and the fill
character.
The window coordinates are from 1 to 80 for left and right and
1 to 25 for top and bottom. Boarder styles are 0 through 5: 0 for
no boarder, 1 for single, 2 for double, 3 and 4 for single/double
line, and 5 for any ASCII character boarder. Shadow style are 0
through 3: 0 for no shadow, 1 for wide shadow, and 3 for narrow
shadow.
Color attributes for text and shadows are standard text colors
0 to 15. Colors 8 to 15 in the back ground set the blink bit. The
shadow locations are 1 to 4 (see simpwn12.h for defines). And last
the borader and fill characters are any ASCII code 0 through 255.
Example:
simp_window(20,5,60,20,5,2,14,4,1,8,0,170,190);
This will display a window 40 x 15 with a boarder of character
190 with a narrow shadow with yellow text on a red bacground.
----------------------------------------------------------------
popup_window()
----------------------------------------------------------------
Popup_window() is the basic mask window call. It has the same
parameteres as simp_window() except for the first one and that is
the record or file number. This call will not error if the file
number is greater than the number of windows initialized but
after the maxed initialized they must be called in sequince or the
wrong file number will be saved. Once called it can be called then
in any sequince. Popup_window() should be called only for windows
that are not made either by makefile or make_window() since it
will change the parameters saved for that window. The file number
can be defined as a name (est. QUIT_WIN) using a define statement.
Example:
Popup_window(31,20,10,60,12,1,2,7,0,1,8,0,0,0);
This will display window 31 that is 40 x 3 with a single
boarder, narrow shadow and lightgray characters on a black
background.
----------------------------------------------------------------
Window Fungtions
make_window()
----------------------------------------------------------------
Make_window() is a nondisplay call and has the same
parameters as popup_window(). It is used to make a window in the
program rather than in the makefile. It only saves the parameters
to a file number and call_window must be used to display the
window. This call will error if the file number is greater than
the max number of windows initialized.
Example:
make_window(3,20,10,60,15,1,2,15,1,1,8,0,0,0);
This call will make a window in the win.dat file at record 3
that is 40 x 6 with a single boarder, narrow shadow, and
white characters on a blue background.
----------------------------------------------------------------
call_window()
----------------------------------------------------------------
Call_window() displays a already made window. It has only one
parameter the file number. It will error if the file number
exceeds the max windows initialized. Call_window can be call at
any time for a window aready created with make_window() or
MAKEFILE. If it is called more than once with out an
uncall_window() the masking info will be lost and only the last
calls mask is saved. This will be improved in the upgrade so that
no info is lost and calls can be make at any time with out worry.
Example:
call_window(4);
This will call window 4 from the win.dat file.
----------------------------------------------------------------
uncall_window()
----------------------------------------------------------------
Uncall_window() restores the screen info save by the last call
to call_window() for a particular file number. It has like
call_window() only one parameter the file number.
Example:
uncall_window(4);
This will uncall window 4.
----------------------------------------------------------------
Window Fungtions
unpopup_window()
----------------------------------------------------------------
unpopup_window() is the uncall fungtion for popup_window and
acts the same. It has only one parameter, the file number.
Example:
unpopup_window(31);
This will unpopup window 31.
----------------------------------------------------------------
clear_window()
----------------------------------------------------------------
Clear_window() will clear and fill the current window with the
fill character. This can be any ASCII code character.
Example:
clear_window(0);
This will fill the current window with null or space characters
leaving the boarder untouched.
----------------------------------------------------------------
move_window()
----------------------------------------------------------------
Move_window() will move the current window's lefttop corner to
the new x, y coordinates. If the window moves off of the screen
the fungtion fails and no move is made.
Example:
move_window(10,10);
This moves the current window ,text and all, to the new topleft
setting.
----------------------------------------------------------------
load_win_data()
----------------------------------------------------------------
Load_win_data loads a file made by makefile so it can be used
by call_window(). It has a single prameter, the file name as a
string to be loaded. This fungtion loads a file to the window file
path chosen with init_window().
Example:
load_win_data("c:\tc\simptut.win");
This will load simptut.win (make with makefile) from directory
tc to win.dat.
----------------------------------------------------------------
Window Fungtions
write_window()
----------------------------------------------------------------
Write_window() is like printf but has positioning parameters.
It will fail and abort if a character is out side of the boarder
of the current win.
Examlpe:
char name[20] = "bruce";
write_window(3,5,"My name is %s",name);
This will display 'My name is bruce' at 3,5 of the current
window.
----------------------------------------------------------------
Menu Fungtions
make_menu()
----------------------------------------------------------------
Make_menu() is a nondisplay fungtion to creat menus in program.
It has 3 parameters, file number, line count, and a string for
each line. File number is the record number for the menu file.
This is the record or file number used to save the menu and to
call it. Line count is the number of lines in the menu. This tells
how many strings there are to the menu. The max number of lines in
a menu are 23 of 76 characters each.
Example:
make_menu(2,5,"string 1","string 2","string 3","string 4",
"string 5");
This will make a menu with strings 1 through 5 and store it in
position 2 in menu.dat.
----------------------------------------------------------------
load_menu_text()
----------------------------------------------------------------
Load_menu_text() loads the menu file make with makefile into
the menu data file. It has one parameter, a string for the path
and name of the file to be loaded.
Example:
load_menu_text("simptut.men");
This will load simptut.men (make with makefile) into menu.dat.
----------------------------------------------------------------
call_menu()
----------------------------------------------------------------
Call_menu() displays the menu called by the parameter
file_num. There are 3 parameters to this call, file number, X
coordinate, and Y coordinate. The file number is the record number
for the menu in the menu data file. X and Y coordinates are the
upper left location in the current window to start displaying the
menu.
Example:
call_menu(2,3,3);
This will call menu 2 from menu.dat and display it in the
current window strating at coordinates 3, 3.
----------------------------------------------------------------
Menu Fungtions
load_text()
----------------------------------------------------------------
Load_text() displays a screen of text 22 lines by 76
characters max. It displays at coordinates 3,3 of the current
window. There are to parameters fine number and file name. File
number is the record number of the text screen to display and
file name contains the path and name of the text file. The text
files are the same as the menu files but are used for help
screens. They are also made the same as menu files with makefile.
Example:
load_text(2,"c:\tc\stuttext.men");
This will display text screen 2 from stuttext.men (made with
makefile) in the current window.
----------------------------------------------------------------
Entery Fungtions
get_choice()
----------------------------------------------------------------
Get_choice() is a bolian fungtion in that it returns a 1 for
ture or yes and 0 for fales or no. There are three parameters, X
and y coordinates for cursor and default display posisioning in
the current window and the defaut character. This is either T or
F or Y or N. It returns 2 on failer.
Example:
get_choice(20,3,"Y");
This call will display a Y at coordinates 20, 3 and wait for a
return or a y or n and return.
----------------------------------------------------------------
get_int_date()
----------------------------------------------------------------
Get_int_date() gets the date in MM/DD/YY format. There are 3
parameters in this fungtion, a 3 int array for the date and X and
Y coordenates for positioning in the current window. Array[0] is
the month, array[1] is the day, and array[2] is the year.
Example:
int date[3];
get_int_date(date,20,3);
This call will display the containts of date in the format
date[0]/date[1]/date[2] at 20,3 in the current window and
wait for data entery and return.
----------------------------------------------------------------
edit_string()
----------------------------------------------------------------
Edit_string() is a full field edit using insert or overstrike.
The left and right cursor keys are active as are HOME and END.
Any special key such as F keys, ALT keys, PGUP/PGDN, or UP/DN
cursor keys are return by the fungtion with the edit string saved.
This allows edit_string to be used in a full screen editor (see
simptut demo). The defines for the special keys are in skdef.h
and should be an include if you use this fungtion. The parameters
are, a pointer to a string, a format string of format characters,
X and Y coordenates for the display of the string in the current
window, and a string of special key masking characters. Format
characters allow only certain characters to be entered and special
key mask block the use of certain special keys.
Example:
char name[10];
edit_string(name,"*********",3,3,"TCAFP");
This call displays the containts of name at coordinates 3, 3
and will mask out tabs,up/dn cursor,up/dn page,F and ALT keys
Entery Fungtions
and control charaters. The containts of name can be edited with
insert/overstrike and left/right cursor
Format characters: Special key masks
* any ascii character T mask out TAB keys
A alphanumaric character A mask out ALT key
U upper case alpha only F mask out fungtion keys
L lower case alpha only C mask out CTRL key
u forced upper case alpha P mask out printer
l forced lower case alpha characters
9 digits 0 - 9 only U mask out UP/DN cursor
F digits 0 - 9, -, . only and PGUP/PGDN keys
e digits 0 - 9, -, ., e, E only PGUP/PGDN keys
# digits 0 - 9 and - E mask out ESC key
h digits 0 - 9, a,b,c,d,e.f,A,B,C,D,E,F,- only
o digits 0 - 7,- only
T t, T, f, F only
Y y, Y, n, N only
----------------------------------------------------------------
get_string()
----------------------------------------------------------------
Get_string is a standard string entery. It has backspace with
no cursor or insert. It is masked and formated. It's parameters
are:pointer to string, a mask string, a format string, X and Y
coordenets, Mask strip switch, and default display switch. The
mask string is any ASCII character for and space for a mask, The
format string is made up of spaces where masked and format
characters (see edit_string()) for enteries. Both mask and format
must be concestent for proper fungtion. Error detection is in the
debug lib but masked characters and enteries must match. The srip
switch is ON for stripping the mask form entery and 0 for the
masks inclution in entery. The default display switch is ON or 1
to display what is in the enter string and OFF or 0 for no display
and mask display. The x y coordinet are for display placement in
the current window. It returns 27 on ESC.
Example:
char name[10];
get_string(name," ","uAAAAAAAA",3,3,1,1);
This call will display the containts of name at coordinates 3,
3, mask all but alph characters and force an uppre case on the
first entery. It will strip the mask and if any character but
backspace is hit first clear name. It will exit on esc with no
data change or return.
----------------------------------------------------------------
Entery Fungtions
get_int()
----------------------------------------------------------------
Get_int() is a intiger entery and takes a pointer to int, the
number of digits including the sign, and X and Y coordinets. Valid
digit lengths are 1 to 6 with overflow detection. X Y coordinets
are agian for current window placement of display.
Example:
int number;
get_int(&number,4,3,3);
This call will display the containts of number at coordinates
3,3 and wait for 4 digit enteries including - and exit on esc
or return.
----------------------------------------------------------------
get_long()
----------------------------------------------------------------
Get_long is the same as get_int() only it takes a pointer to
long. It,s valid digit length is 1 to 10.
Example:
long int Lnumber;
get_long(&Lnumber,8,3,2);
This call acts the same as get_int except it takes a long.
----------------------------------------------------------------
Print Fungtions
print_printf()
----------------------------------------------------------------
Print_printf() is just like printf() but it goes to a print
buffer and has the first to parameters, X and Y coordinents, for
placement on the print page The print page is a 60 line by 80
character buffer that is printed by print_buff().
Example:
int varable = 26;
print_printf(20,25,"Number is %d",varable);
This call will load Number is 26 into the print buffer at
coordinates 20, 25.
----------------------------------------------------------------
print_putch()
----------------------------------------------------------------
Print_putch(), like print_printf, is the same as putch(). The
first two parameters, which are X and Y coordinents, are for
placement. It is used for single character placement such as line
feeds or carrage returns in the print page and can also be used
for fancier graphic designs.
Example:
print_putch(80,30,0x0d);
This call will put character 0x0d at coordinates 80,30 in the
print buffer.
----------------------------------------------------------------
print_horizontal_line()
----------------------------------------------------------------
Print_horizontal_line has six parameters. The first three are
the start, middle, and end characters of the line. These are any
ASCII character 0 to 255. The last three parameters are the start
X, end X, and y coordinents. X can be 1 to 80 but the start must
be greater than or equal to the end. Y can be 1 to 60. It like all
the print fungtions is loaded into the page buffer.
Example
print_horizontal_line(0xc7,0xc4,0xb6,1,80,20);
This call puts a line 80 charaters long in row 20 of the print
buffer.
----------------------------------------------------------------
Print Fungtions
print_vertical_line()
----------------------------------------------------------------
Print_vertical_line has six paramiters. The first three are
start, middle and end characters of the line. These are any ASCII
charaters 0 to 255. The last three parameters are X, start Y, end
Y. X can be 1 to 80, y is 1 to 60. This is loaded into the page
buffer for printing later.
Example:
print_vertical_line(0xd2,0xba,0xd0,40,1,60);
This call puts a vertical line in column 40, 60 characters long
in the print buffer.
----------------------------------------------------------------
print_window()
----------------------------------------------------------------
Print_window() draws a window in the page buffer. It has the
four window parameters left, top, right, bottom. It also has the
boarder style and boarder character for ANY_BOARDER. The boarder
styles are the same as simp_window() and the characters are any
ASCII code 0 to 255. Windows can be as large as the whole page or
80 x 60.
Example:
print_window(1,1,80,60,2,0);
This call puts a window 80x60 with a double boarder in the
print buffer.
----------------------------------------------------------------
clear_print_buff()
----------------------------------------------------------------
Clear_print_buff clears the page buffer and loads it with the
ASCII code 0x20. It is used when a new form is to be made.
Example:
clear_print_buff();
This call clears the print buffer.
----------------------------------------------------------------
print_buff()
----------------------------------------------------------------
Print_buff sends the contents of the page buffer to the printer.
All 60 lines will be printed unless you insert a NULL (0x00)
character in the page buffer. If a NULL charater is incounterd or
all 60 lines are printed the printing will stop and the fungtion
will return.
Example:
print_buff();
This sends what is current in the print buff to the printer.
----------------------------------------------------------------
Print Fungtions
load_form()
----------------------------------------------------------------
Load_form() is for loading a premade print form made with
makefile into the page buffer. It then can be further edited and
printed. The record number and path/filename are the parameters.
Example:
load_form(0,"simptut.prn");
This call will load print form 0 from simptut.prn (make with
makefile) to the print buffer.
----------------------------------------------------------------
print_char()
----------------------------------------------------------------
Print_char() sends a charater to the printer and prints it. It
takes a ASCII character code 0 thru 255.
Example:
print_char(0x0c);
This will send a form feed to the printer.
----------------------------------------------------------------
Screen Fungtions
draw_horizontal_line()
----------------------------------------------------------------
Draw_hoizontal_line() will put a horizontal line stating at
start_x, y and end on end_x, y. The three character paramiters
are: start, middle, end. These can be any ASCII code charater.
Example:
draw_horizontal_line(0x101,0x102,0x103,3,50,10);
This will draw a line (ABBBBBB...BBBBBBBC) at 3,10 to 50,10.
----------------------------------------------------------------
draw_vertical_line()
----------------------------------------------------------------
Draw_vertical_line() is the same as hoizontal line except it
takes x, start_y,end_y.
Example:
draw_vertical_line(0x101,0x102,0x103,20,3,20);
This will draw line A at 20,3 to 20,20.
B
B
...
B
B
C
----------------------------------------------------------------
show_cursor()
----------------------------------------------------------------
Show_cursor() will display the IBM cursor.
Example:
show_cursor();
This will display the blinking IBM cursor.
----------------------------------------------------------------
hide_cursor()
----------------------------------------------------------------
Hide_cursor() turns the IBM cursor off.
Example:
hide_cursor();
This will hide or turn of the IBM cursor display.
----------------------------------------------------------------
Screen Fungtions
move_cursor()
----------------------------------------------------------------
Move_cursor() will move the cursor in the current window. If
the cursor is moved beyond the current window the fungtion will
fail and no move will be made.
Example:
move_cursor(3,10);
This will position the cursor at window coordinates 3,10 in the
current window.
----------------------------------------------------------------
load_screen_form()
----------------------------------------------------------------
Load_screen_form loads a ready made form (mode with makefile)
to the current window. The form will turnkate beyond the inner
window parameters. A record number and a file name are called for.
Example:
load_screen_form(0,"simptut.scr");
This will load the simptut title screen into the current window.
----------------------------------------------------------------
read_text()
----------------------------------------------------------------
Read_text() will display a text file in the current window
trunkating or wrapping around with page up/dn. It will exit with
ESC.
Example:
read_text("mou.doc",1);
This will display the text of mou.doc page by page int the
current window with wraparound.
----------------------------------------------------------------
save_screen()
----------------------------------------------------------------
Save_screen() will save the current screen to screen save file
at the designated record number.
Example:
save_screen(2);
This saves the current screen to record number 2 in screen.dat.
----------------------------------------------------------------
Screen Fungtions
load_screen()
----------------------------------------------------------------
Load_screen() is the other half of screen save and works the
same.
Example:
load_screen(2);
This will load the screen record 2 from screen.dat and display
it.
----------------------------------------------------------------
save_screen_buff()
----------------------------------------------------------------
Save_screen_buff() saves the current screen to a ram buffer.
It is for use with a mouse or when a fast screen display is
needed.
Example:
save_screen_buff();
This will save the current screen to ram.
----------------------------------------------------------------
load_screen_buff()
----------------------------------------------------------------
Load_screen_buff() will display the save screen buffer.
Example:
load_screen_buff();
This will display the screen in save screen buffer.
----------------------------------------------------------------
Music Fungtions
set_tempo()
----------------------------------------------------------------
Set_tempo() sets the speed or tempo of each note. The settings
are in milli seconds.
Example:
set_tempo(1000);
This sets the duration of a quarter note at 1 second.
----------------------------------------------------------------
tone()
----------------------------------------------------------------
Tone sounds a single note. It takes the note (A thru Ab), the
size of the note (64,32,16,8,4,2,1), and the octive (0 thru 7).
Zero being no sound.
Example:
tone(Cs,4,3); (alternate tone(5,4,3);)
This sounds a C# quarter note in the second octive above A55.
----------------------------------------------------------------
cord()
----------------------------------------------------------------
Cord() sounds a 4 note arpagio cord. It takes the root note
(A thru Ab), the duration of the cord (8,4,2,1), and the cord
(M, M7, 7, m, m7).
Example:
cord(Cs,1,MINOR); (alternate cord(5,1,"m");)
This sounds a C# minor cord for one whole note.
----------------------------------------------------------------
playsong()
----------------------------------------------------------------
Playsong() will play a song file (made with makefile) returning
0 if no key is struck before the end of the file or a 1 if a key
is entered.
Example:
while(playsong("simptut.sng") == 0){}
This will play simptut.sng tell a key is struck.
----------------------------------------------------------------
File Fungtions
read_file()
----------------------------------------------------------------
Read_file() reads a block of bytes from a file. Parameters are:
buff for the bytes read, file path and name, block size in bytes
(int), byte to start read (long int).
Example:
read(buff,"simptut.win",2000,4056L);
This will read the first 2000 bytes of file simptut.win stating
at byte 4056 into buff.
----------------------------------------------------------------
write_file()
----------------------------------------------------------------
Write file is the same as read file only it writes buff into
the file.
Example:
write_file(buff,"simptut.win",2000,4056L);
This will write the containts of buff into the first 2000 bytes
of the file simptut.win starting at byte 4056.
----------------------------------------------------------------
file_to_file()
----------------------------------------------------------------
File_to_file copies a block of bytes from one file to another.
It takes a buffer the size of the block, a source file, its start
byte, a destination file, its start byte, and the size of the
block.
Example:
char buff[2000];
file_to_file(buff,"simptut.win",4056L,"win.dat",0L,2000);
This will copy the first 2000 bytes of simptut.win starting at
byte 4056 to win.dat starting at 0 bytes.
----------------------------------------------------------------
copy_file()
----------------------------------------------------------------
Copy file() copies one file to another. It takes the
destination file and source file. If there is no destination file
it will attempt to creat one.
Example:
copy_file("simptut.win","win.dat");
This will copy simptut.win to win.dat.
----------------------------------------------------------------
File Fungtions
creat_file()
----------------------------------------------------------------
Creat_file() will creat a file if one dose not exist. It takes
the file name and path.
Example:
creat_file("win.dat");
This will creat a file called win.dat if one dose not exist.
----------------------------------------------------------------
read_directory()
----------------------------------------------------------------
Read_directory() reads the files in a directory an loads buff
with thier names. It takes the buffer, the number of names, and
the full path/file name (*.text).
Example:
char buff[20][13];
read_directory(buff,20,"*.text");
This will read the current directory and load buff with the
first 20 text files found. This can then be displayed for
selection.
----------------------------------------------------------------
Init Fungtions
init_window()
----------------------------------------------------------------
Init_window() initializes the temp files and mallocs the
buffering. It's parameters are the number of windows, menus, and
screen saves, the drive to use (a ram disk can be used), and
selects the LP port to use.
Example:
init_window(20,20,5,"D",1);
This will init the utilitie to use 20 windows, 20 menus, 5
screen saves, drive D, and LP port 1.
----------------------------------------------------------------
uninit_window()
----------------------------------------------------------------
Uninit_window() will delete the temp files and free any
malloced buffers.
Example:
uninit_window();
This call frees malloc memory and removes the temp files.
----------------------------------------------------------------
Mouse Fungtions
mouinstalled()
----------------------------------------------------------------
Mouinstalled() returns the number of buttons if the mouse driver
is present or 0 if no driver found.
Eample:
mouinstalled();
This will check for mouse driver and return a the number of
buttons if found.
----------------------------------------------------------------
moureset()
----------------------------------------------------------------
Moureset() resets the mouse driver and should be used when
mouinstalled finds a driver and when exiting the program.
Example:
moureset();
This will reset the mouse driver.
----------------------------------------------------------------
moubuttonpressed()
----------------------------------------------------------------
Moubuttonpressed() takes the number of the button that you want
to check (0 LEFTBUTTON, 1 RIGHTBUTTON, 2 MIDBUTTON) and returns
the number of times the button was pessed since last checked.
Example:
if(moubuttonpressed(0))
{
read_text("mouse.doc",0);
}
This will read the mouse docs if the LEFTBUTTON is pressed.
----------------------------------------------------------------
Mouse Fungtions
mou_on()
----------------------------------------------------------------
Mou_on() displays the graphic mouse cursor and must be call
each time the mouse is moved.
Example:
int moux,mouy,oldx = -1,oldy = - 1;
for(;;)
{
mouposition(&moux,&mouy);
if((oldx != moux) | (oldy != mouy))
{
oldx = moux;
oldy = mouy;
mou_on();
if(moubuttonpressed)
{
break;
}
}
}
This shows the mouse graphics cursor till a button is pressed.
----------------------------------------------------------------
mou_off()
----------------------------------------------------------------
Mou_off() is called once to shutoff the mouse graphics cursor.
A call to mou_on() is needed after that to display the cursor.
Example:
mou_off();
This will shut the cursor off.
----------------------------------------------------------------
mouhide()
----------------------------------------------------------------
Mouhide() hides the standard mouse cursor for text.
Example:
mouhide();
The standard mouse cursor will be hidden.
----------------------------------------------------------------
Mouse Fungtions
moushow()
----------------------------------------------------------------
Moushow() shows thw standard mouse cursor and nedds to be
called only once after a mouhide().
Example:
moushow();
This will show the standard mouse cursor.
----------------------------------------------------------------
mousetposition()
----------------------------------------------------------------
Mousetposition() puts the mouse cursor and mouse at the x, y
coordenents int the paramiters.
Example:
mousetposition(5,5);
This will place the mouse at coordenets 5,5 on the screen.
----------------------------------------------------------------
mousetmaxposition()
----------------------------------------------------------------
Mousetmaxposition() sets the mouse coordinent limits. It takes
four parameters menx, maxx, meny, maxy.
Example:
mousetmaxposition(5,20,5,20);
This will confine mouse movment to a window(5,5,20,20).
----------------------------------------------------------------
moubuttonrelease()
----------------------------------------------------------------
Moubuttonrelease() takes the number of the button to check (0
LEFTBUTTON, 1 RIGHTBUTTON, 2 MIDBUTTON) and returns the number of
times that button was released since last checked.
Example:
for(;;)
{
if(moubuttonrelease(2))
{
break;
}
}
This will remain in the loop until the MIDBUTTON is pressed
and released.
----------------------------------------------------------------
Mouse Fungtions
loadcurs()
----------------------------------------------------------------
Loadcurs() loads the graphic cursor. It taes the file name and
an int 0 to 31.
Example:
loadcurs("cursor.fnt",3);
This will load the forth character in the file cursor.fnt for
use with mou_on and mou_off.
----------------------------------------------------------------
mouposition()
----------------------------------------------------------------
Mouposition() returns the mouse position in the parameters *x,
*y.
Example:
int x,y;
mouposition(&x,&y);
This will put the current mouse position in the ints x and y.
----------------------------------------------------------------
DEFINITION OF SHAREWARE
Shareware distribution gives users a chance to try software
before buying it. If you try a Shareware program and continue
using it, you are expected to register. Individual programs
differ on details -- some request registration while others
require it, some specify a maximum trial period. With
registration, you get anything from the simple right to
continue using the software to an updated program with printed
manual.
Copyright laws apply to both Shareware and commercial
software, and the copyright holder retains all rights, with a
few specific exceptions as stated below. Shareware authors are
accomplished programmers, just like commercial authors, and the
programs are of comparable quality. (In both cases, there are
good programs and bad ones!) The main difference is in the
method of distribution. The author specifically grants the
right to copy and distribute the software, either to all and
sundry or to a specific group. For example, some authors
require written permission before a commercial disk vendor may
copy their Shareware.
Shareware is a distribution method, not a type of software.
You should find software that suits your needs and pocketbook,
whether it's commercial or Shareware. The Shareware system
makes fitting your needs easier, because you can try before you
buy. And because the overhead is low, prices are low also.
Shareware has the ultimate money-back guarantee -- if you don't
use the product, you don't pay for it.
****************************************************************
This file contains important license information regarding the
use of Simple Windows, Version 1.4B. This information applies
to individual users who wish to pass copies out to friends and
associates.
PLEASE! Show your support for Shareware by registering the
programs you actually use. Simply Soft depends upon and
needs your support. Thank you!
Trial Use License:
~~~~~~~~~~~~~~~~~~
Simple Windows is NOT a public domain program. It is Copyright
(c) 1994, 1995, 1996 by Bruce O'Banion. All rights reserved.
This software and accompanying documentation are protected by
United States Copyright law and also by International Treaty
provisions. Any use of this software in violation of Copyright
law or the terms of this limited license will be prosecuted to
the best of our ability. The conditions under which you may
copy this software and documentation are clearly outlined below
under "Distribution Restrictions".
Bruce O'Banion hereby grants you a limited license to use this
software for evaluation purposes for a period not to exceed
Thirty (30) days. If you intend to continue using this
software (and/or it's documentation) after the Thirty (30) day
evaluation period, you MUST make a registration payment to
Bruce R. O'Banion.
- Simple Windows, Version 1.4B - LICENSE.DOC -
Using this software after the thirty (30) day evaluation period
without registering the software is a violation of the terms of
this limited license.
Licensee shall not use, copy, rent, lease, sell, modify,
decompile, disassemble, otherwise reverse engineer, or transfer
the licensed program except as provided in this agreement. Any
such unauthorized use shall result in immediate and automatic
termination of this license.
All rights not expressly granted here are reserved to Simply
Soft.
Limited Distribution License:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
As the copyright holder for Simple Windows, Bruce R. O'Banion
authorizes distribution by individuals only in accordance with
the following restrictions.
Individuals are hereby granted permission by Bruce R. O'Banion
to copy the Simple Windows diskette for their own use (for
evaluation purposes) or for other individuals to evaluate, ONLY
when the following conditions are met.
The Simple Windows package is defined as containing all the
material listed in the PACKING.LST text file. If any files
listed in the PACKING.LST text file, or the PACKING.LST file
itself, are missing, then the package is not complete and
distribution is forbidden. Please contact us to obtain a
complete package suitable for distribution.
o The Simple Windows package - including all related program
files and documentation files - CANNOT be modified in any
way and must be distributed as a complete package, without
exception. The PACKING.LST text file contains a list of
all files that are part of the Simple Windows package.
o No price or other compensation may be charged for the
Simple Windows package. A distribution cost may be
charged for the cost of the diskette, shipping and
handling, as long as the total (per disk) does not exceed
US$10.00 in the U.S. and Canada, or US$15.00
internationally.
o The Simple Windows package CANNOT be sold as part of some
other inclusive package. Nor can it be included in any
commercial software packaging offer, without a written
agreement from Bruce R. O'Banion.
o The User's Guide may not be reproduced in whole or
in part, using any means, without the written permission
of Bruce R. O'Banion. In other words, the disk-based
documentation may not be distributed in PRINTED (hardcopy)
form.
o The Simple Windows package cannot be "rented" or "leased"
to others.
o Licensee shall not use, copy, rent, lease, sell, modify,
decompile, disassemble, otherwise reverse engineer, or
transfer the licensed program except as provided in this
agreement. Any such unauthorized use shall result in
immediate and automatic termination of this license.
All rights not expressly granted here are reserved to Bruce R.
O'Banion
-------------------------------------------------------------------
Distribution Requirements VENDORS
-------------------------------------------------------------------
Computer Clubs and User Groups wishing to add the Simple
Windows package to their disk library may do so in accordance
with the Distribution Restrictions listed below.
Limited Distribution License:
-----------------------------
As the exclusive copyright holder for Simple Windows, Bruce R.
O'Banion authorizes distribution only in accordance with the
following restrictions.
ASP Approved Vendors in good standing are hereby given
permission to distribute Simple Windows package. Non-ASP
member vendors must request permission prior to distributing
this package.
The Simple Windows package is defined as containing all the
material listed in the PACKING.LST text file. If any files
listed in the PACKING.LST text file, or the PACKING.LST file
itself, are missing, then the package is not complete and
distribution is forbidden. Please contact us to obtain a
complete package suitable for distribution.
The Simple Windows package - including all related program
files and documentation files - CANNOT be modified in any way
and must be distributed as a complete package, without
exception. The PACKING.LST text file contains a list of all
files that are part of the Simple Windows package.
Small additions to the package, such as the introductory used
by many shareware disk vendors, are acceptable.
No price or other compensation may be charged for the Simple
Windows package. A distribution fee may be charged for the
cost of the diskette, shipping and handling, as long as the
total (per disk) does not exceed US$10.00 in the U.S. and
Canada, or US$15.00 internationally.
Disk Sets & CD-ROMs:
~~~~~~~~~~~~~~~~~~~~
The Simple Windows package CANNOT be sold as part of some other
inclusive package. Nor can it be included in any commercial
software packaging offer, without a written agreement from
Bruce R. O'Banion.
ASP Approved Vendors who wish to distribute the Simple Windows
package as part of a collection (such as PsL's MegaDisk set, or
a CD-ROM package) may do so provided that all the other
restrictions are met.
Vendors (non-ASP Vendor Members) who wish to distribute the
Simple Windows package as part of a collection (such as PsL's
MegaDisk set, or a CD-ROM package) must obtain permission from
Bruce R. O'Banion prior to beginning such a distribution.
If you wish to add any of our programs to a CD-ROM or other
collection, please check the release date of the version you
have. If the version is over twelve (12) months old then
please contact us to ensure that you have the most current
version. This version was released in October,1996.
Disk-of-the-Month (or Subscription) Distribution:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you would like to distribute the Simple Windows package as
a Disk-of-the-Month, or as part of a subscription or monthly
service, then the following restrictions apply:
You cannot use a Disk-of-the-Month distribution to use up your
inventory of old (out of date) disks. Only current versions
may be shipped as Disk-of-the-Month disks.
The User's Guide may not be reproduced in whole or in part,
using any means, without the written permission of Bruce R.
O'Banion. In other words, the disk-based documentation may
not be distributed in PRINTED (hardcopy) form.
The Simple Windows package cannot be "rented" or "leased" to
others.
You may not list any of our products in advertisements,
catalogs, or other literature which describes our products as
"FREE SOFTWARE". Shareware is "Try-Before-You-Buy" software,
it is not free.
Bruce R. O'Banion prohibits the distribution of outdated
versions of the Simple Windows package, without written
permission from Bruce R. O'Banion. If the version you have is
over twelve (12) months old, please contact us to ensure that
you have the most current version. This version was released
in October, 1996.
Licensee shall not use, copy, rent, lease, sell, modify,
decompile, disassemble, otherwise reverse engineer, or transfer
the licensed program except as provided in this agreement. Any
such unauthorized use shall result in immediate and automatic
termination of this license.
All rights not expressly granted here are reserved to Bruce R.
O'Banion.
-----------------------------------------------------------------
Distribution Requirements: SYSOPS
-----------------------------------------------------------------
Limited Distribution License:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
As the exclusive copyright holder for Simple Windows, Bruce R.
O'Banion authorizes on-line distribution only in accordance
with the following restrictions.
The Simple Windows package is defined as containing all the
material listed in the PACKING.LST text file. If any files
listed in the PACKING.LST text file, or the PACKING.LST file
itself, are missing, then the package is not complete and
distribution is forbidden. Please contact us to obtain a
complete package suitable for distribution.
o The Simple Windows package - including all related program
files and documentation files - CANNOT be modified in any
way (other than that mentioned in the following paragraph)
and must be distributed as a complete package, without
exception. The PACKING.LST text file contains a list of
all files that are part of the Simple Windows package.
o Many BBSs customarily add a small text file
(advertisement) to each archived file. This text file
describes the BBS and tells people that the file was
downloaded from that particular BBS. Other BBSs add a
small one-line message with their BBS name and phone
number into the compressed file, which will display when
the file is uncompressed. Either of these methods of
mentioning your BBS are acceptable and may be used,
provided the program and documentation is otherwise
unmodified and complete.
o Bruce R. O'Banion prohibits the distribution of outdated
versions of the Simple Windows package, without written
permission from Bruce R. O'Banion. If the version you
have obtained is over twelve (12) months old, please
contact us to ensure that you have the most current
version.
o Licensee shall not use, copy, rent, lease, sell, modify,
decompile, disassemble, otherwise reverse engineer, or
transfer the licensed program except as provided in this
agreement. Any such unauthorized use shall result in
immediate and automatic termination of this license.
All rights not expressly granted here are reserved to Bruce R.
O'Banion
***************** IMPORTANT WARRANTY INFORMATION ****************
Simple Windows#, Version 1.4B
*** PLEASE READ THIS INFORMATION CAREFULLY ***
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TRIAL USE (SHAREWARE EVALUATION VERSION) WARRANTY:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Shareware evaluation (trial use) version is provided AS IS.
Bruce R. O'Banion MAKES NO WARRANTY OF ANY KIND, EXPRESSED OR
IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
REGISTERED VERSION ONLY WARRANTY:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bruce R. O'Banion warrants the physical diskette(s) and physical
documentation provided with registered versions to be free of
defects in materials and workmanship for a period of ninety days
from the date of registration. If Bruce R. O'Banion receives
notification within the warranty period of defects in materials
or workmanship, and such notification is determined by Falk Data
Systems to be correct, Bruce R. O'Banion will replace the
defective diskette(s) or documentation.
The entire and exclusive liability and remedy for breach of this
Limited Warranty shall be limited to replacement of defective
diskette(s) or documentation and shall not include or extend to
any claim for or right to recover any other damages, including
but not limited to, loss of profit, data, or use of the software
or special, incidental, or consequential damages or other
similar claims, even if Bruce R. O'Banion has been specifically
advised of the possibility of such damages. In no event will
Bruce R. O'Banion's liability for any damages to you or any
other person ever exceed the lower of suggested list price or
actual price paid for the license to use the software,
regardless of any form of the claim.
Bruce R. O'Banion SPECIFICALLY DISCLAIMS ALL OTHER WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED
WARRANTY OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
PURPOSE.
*******************************************************************
ASP OMBUDSMAN STATEMENT
*******************************************************************
"This program is produced by a member of the Association
of Shareware Professionals (ASP). ASP wants to make sure
that the shareware principle works for you. If you are
unable to resolve a shareware-related problem with an ASP
member by contacting the member directly, ASP may be able
to help. The ASP Ombudsman can help you resolve a dispute
or problem with an ASP member, but does not provide
technical support for members' products. Please write to
the ASP Ombudsman at 545 Grover Road, Muskegon, MI
49442-9427 USA, FAX 616-788-2765 or send a Compuserve
message via CompuServe Mail to ASP Ombudsman 70007,3536"
*******************************************************************
If you would like to apply for ASP Associate Membership (to
become an ASP Approved Vendor), simply write to the following
address and request a Vendor Membership Application Package:
ASP Executive Director
545 Grover Road
Muskegon, MI 49442-9427
U.S.A.
or send a CompuServe message via CompuServe MAIL to ASP
Executive Director 72050,1433. You may also FAX a request to
the ASP Executive Director at 616-788-2765.
****************************************************************
NOTE: sw14b.zip is packaged on this disk using
Info-ZIP's compression utility. The installation program
uses UnZip to read zip files from the disk. Info-ZIP's
software (Zip, UnZip and related utilities) is free and
can be obtained as source code or executables from
various bulletin board services and anonymous-ftp sites,
including CompuServe's IBMPRO forum and ftp.uu.net:/pub/
archiving/zip/*.
****************************************************************
U.S. Government Information: Use, duplication, or
disclosure by the U.S. Government of the computer software
and documentation in this package shall be subject to the
restricted rights applicable to commercial computer
software as set forth in subdivision (b)(3)(ii) of the
Rights in Technical Data and Computer Software clause at
252.227-7013 (DFARS 52.227-7013). The
Contractor/manufacturer is Simply Soft, 318
Oak St. Modesto,CA 95351
*****************************************************************
Please Help Us Serve You Better:
--------------------------------
We would appreciate copies of anything you print regarding Simple
Windows. Please send us a copy of any reviews, articles, catalog
descriptions, or other information you print or distribute
regarding the Simple Windows package. Thank you for your time
and assistance and for supporting the shareware marketing
concept.
Please refer to SIMPWN14.DOC for our mailing address and phone
number.
Thank you for your support!
*******************************************************************
TURBO C++ 1.0 copyright 1990 Borland International
TURBO C 2.0 copyright 1987,1988 Borland Inernational
MS_DOS 5.0 copyright 1987-1991 Microsoft Corp.
*******************************************************************
The attached VENDINFO data record is hereby incorporated by
reference. Any distribution satisfying all the distribution
requirements expressed in that data record is hereby authorized.